Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import { Box, Paper, Stack, Text, Title } from '@mantine/core';
import { useTranslations } from 'next-intl';
import classes from '../RecipeDetail.module.css';
import type { RecipeStepsProps } from '../types';
export const RecipeSteps = ({ steps }: Readonly<RecipeStepsProps>) => {
const translate = useTranslations('recipeDetail');
return (
<Box>
<Title order={2} size="h3" mb="lg">
{translate('preparationSteps')}
</Title>
<Stack gap="lg">
{steps.map((step) => (
<Paper
key={step.order}
p="lg"
radius="md"
withBorder
className={classes.stepCard}
>
<span className={classes.stepWatermark}>{step.order}</span>
<Box className={classes.stepContent}>
<Text size="md" lh={1.7}>
{step.description}
</Text>
</Box>
</Paper>
))}
</Stack>
</Box>
);
};
|